//
//  SiterDeviceNetManager.h
//  sHome
//
//  Created by tracyhenry on 2022/8/15.
//  Copyright © 2022年 SiterWell. All rights reserved.
//

#import "SiterBaseNetManager.h"
#import "TimerPresetMode.h"

@interface SiterDeviceNetManager : SiterBaseNetManager

//获取设备列表
+ (void) getSingleDeviceInfo:(NSString *)thingName handle:(void(^)(id,NSError *,NSError *)) handler;

//根据房间获取设备列表
+ (void) getDeviceList:(NSNumber *)roomId handle:(void(^)(id,NSError *,NSError *)) handler;

//获取所有设备列表
+ (void) getDeviceList:(void(^)(id,NSError *,NSError *)) handler;


//获取共享设备列表
+ (void) getSharePageList:(void(^)(id,NSError *,NSError *)) handler;

//绑定设备
+ (void) bindDevice:(NSString *)thingName withRoomId:(NSNumber *)roomId handle:(void(^)(id,NSError *,NSError *)) handler;

//绑定设备(网关接口)
+ (void) bindDeviceByGateway:(nonnull NSString *)thingName withRoomId:(NSNumber *)roomId handle:(void(^)(id,NSError *,NSError *)) handler;

//绑定设备
+ (void) unbindDevice:(NSString *)thingName handle:(void(^)(id,NSError *,NSError *)) handler;


//修改设备名称
+ (void) modifyDeviceName:(NSString *)deviceName withThingName:(NSString *)thingName handle:(void(^)(id,NSError *,NSError *)) handler;

//修改子设备名称
+ (void) modifySubDeviceName:(NSString *)deviceName withThingName:(NSString *)thingName withDeviceCode:(NSString *)deviceCode handle:(void(^)(id,NSError *,NSError *)) handler;

//获取设备OTA信息
+ (void) getOTA:(NSArray *)params handle:(void(^)(id,NSError *,NSError *)) handler;

//获取新的网关设备
+ (void) getNewDeviceList:(NSString *)pinCode handle:(void(^)(id,NSError *,NSError *)) handler;


//获取某个设备影子状态
+ (void) getDeviceShadow:(NSString *)thingName handle:(void(^)(id,NSError *,NSError *)) handler;

//获取某个设备ShadowName的影子状态
+ (void) getDeviceShadowWithShadowName:(NSString *)thingName withShadowName:(NSString *)shadowName handle:(void(^)(id,NSError *,NSError *)) handler;



//添加温控器定时模式
+(void) addTimerMode:(NSString *)thingName withMode:(NSNumber *)mode withModeName:(NSString *)modeName withTempCool:(float)temp_cool withTempHot:(float)temp_hot withHandler:(void (^)(id, NSError *, NSError *))handler;


//编辑温控器定时模式
+(void) editTimerMode:(NSString *)thingName withMode:(NSNumber *)mode withModeName:(NSString *)modeName withTempCool:(float)temp_cool withTempHot:(float)temp_hot withHandler:(void (^)(id, NSError *, NSError *))handler;

//下发控制设备通过设备影子
+(void) commandToShadow:(NSString *)thingName withShadowName:(NSString *)shadowName withShadow:(NSString *)shadow withHandler:(void (^)(id, NSError *, NSError *))handler;


//下发控制HVAC设备模式
+(void) commandHvacMode:(NSString *)thingName withHotMode:(BOOL)isHot withCoolMode:(BOOL)isCool withFanMode:(BOOL)isFan withECO:(BOOL)isECO withHandler:(void (^)(id, NSError *, NSError *))handler;

//下发设置HVAC设置温度
+(void) commandHvacTemp:(NSString *)thingName withTemp:(float)temp withUnit:(NSString *)devunit withHandler:(void (^)(id, NSError *, NSError *))handler;

//下发设置HVAC温度单位
+(void) commandHvacDevUnit:(NSString *)thingName withThingTypeName:(NSString *)thingTypeName withUnit:(NSString *)devUnit withHandler:(void (^)(id, NSError *, NSError *))handler;

//检测OTA可更新状态
+(void) checkOTAversion:(NSString *)thingName withHandler:(void (^)(id, NSError *, NSError *))handler;

//查询设备升级进度
+(void) getOTAProgress:(NSString *)thingName withJobId:(NSString *)jobid withHandler:(void (^)(id, NSError *, NSError *))handler;

//下发OTA升级命令
+(void) otaCommandToDevice:(NSString *)thingName withHandler:(void (^)(id, NSError *, NSError *))handler;



//获取hvac预设置模式
+(void) getHvacModeList:(NSString *)thingName withHandler:(void (^)(id, NSError *, NSError *))handler;

//新增hvac预设置模式
+(void) addHvacMode:(TimerPresetMode *)preMode withHandler:(void (^)(id, NSError *, NSError *))handler;

//删除hvac预设置模式
+(void) deleteHvacMode:(NSNumber *)modeId withHandler:(void (^)(id, NSError *, NSError *))handle;

//编辑hvac预设置模式
+(void) editHvacMode:(TimerPresetMode *)preMode withHandler:(void (^)(id, NSError *, NSError *))handler;


//获取告警中心列表
+ (void) getMessageRecordList:(NSString *)thingName withDeviceCode:(NSString *)deviceCode  withPageNum:(NSNumber *)pageNum withPageSize:(NSNumber *)pageSize withHandler:(void(^)(id,NSError *,NSError *)) handler;

//设置某条报警已读
+ (void) setAlarmRead:(NSString *)messageId  handle:(void(^)(id,NSError *,NSError *))handler;

//设置某个设备设置成所有已读
+ (void) setAlarmAllRead:(NSString *)thingName  withDeviceCode:(NSString *)deviceCode handle:(void(^)(id,NSError *,NSError *))handler;


//获取设备告警推送设置(GS888/GS886)
+ (void) getDevicePushConfig:(NSString *)thingName  handle:(void(^)(id,NSError *,NSError *)) handler;

//更新设备告警推送设置(GS888/GS886)
+ (void) updateDevicePushConfig:(NSNumber *)configId withCode:(NSString *)code withOpen:(NSNumber *)isOpen handle:(void(^)(id,NSError *,NSError *)) handler;

//获取自测日志
+ (void) getMessageRecordListBySelfTest:(NSString *)thingName  withPageNum:(NSNumber *)pageNum withPageSize:(NSNumber *)pageSize withHandler:(void(^)(id,NSError *,NSError *)) handler;

//获取Smoke日曲线
+ (void) getCurveSMDay:(NSString *)thingName withStartTime:(NSString *)startTime withTimeZone:(NSString *)timeZone withHandler:(void(^)(id,NSError *,NSError *)) handler;

//获取Smoke年/月曲线
+ (void) getCurveSMYear:(NSString *)thingName withStartTime:(NSString *)startTime  withHandler:(void(^)(id,NSError *,NSError *)) handler;

//获取CO日曲线
+ (void) getCurveCODay:(NSString *)thingName withStartTime:(NSString *)startTime withTimeZone:(NSString *)timeZone withHandler:(void(^)(id,NSError *,NSError *)) handler;

//获取CO年/月曲线
+ (void) getCurveCOYear:(NSString *)thingName withStartTime:(NSString *)startTime withHandler:(void(^)(id,NSError *,NSError *)) handler;

//解绑分享设备
+ (void) unbindShareDevice:(NSString *)thingName withHandler:(void(^)(id,NSError *,NSError *)) handler;

//获取网关下的子设备列表
+ (void) getDeviceListFromGateway:(NSString *)thingName withHandler:(void(^)(id,NSError *,NSError *)) handler;
@end
